let a = 123;
//方式1
console.log(typeof (String(a)), String(a))  //string 123
//方式2
console.log(typeof (a.toString()), a.toString())  //string 123
//方式3
console.log(typeof(a+''),a+'')  //string 123